package ooday04;
/** 向上造型的演示 */
public class UploadDemo {
    public static void main(String[] args) {
        Dog    o1 = new Dog("小黑",2,"黑");
        //o1.name/age/color/eat()/drink()/swim()/lookHome()
        Animal o2 = new Dog("小黑",2,"黑"); //向上造型----多态
        //o2.name/age/color/eat()/drink()
        Swim   o3 = new Dog("小黑",2,"黑"); //向上造型----多态
        //o3.swim();
    }
}
















